package com.cosmoplat.xikai.business.service;

import com.cosmoplat.xikai.business.domain.BaseDeliveryInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cosmoplat.xikai.business.domain.BaseDispatchTask;
import com.cosmoplat.xikai.business.domain.dto.materialRequirement.MaterialRequirementQueryDTO;
import com.cosmoplat.xikai.business.domain.vo.MaterialRequirementVo;

import java.util.List;

/**
* @author 22047582
* @description 针对表【base_delivery_info】的数据库操作Service
* @createDate 2025-01-07 13:51:30
*/
public interface BaseDeliveryInfoService extends IService<BaseDeliveryInfo> {

    /**
     * 查询物料需求
     * @param queryDTO
     * @return
     */
    List<MaterialRequirementVo> queryMaterialRequirement(MaterialRequirementQueryDTO queryDTO);

    /**
     * 根据任务号查询配送物料数据
     * @date 13:32 2025/1/10
     * @param taskId
     * @return java.util.List<com.cosmoplat.xikai.business.domain.BaseDeliveryInfo>
     **/
    List<BaseDeliveryInfo> getListByTaskId(String taskId);

    /**
     * 根据任务id和物料编码查询配送信息
     * @date 11:18 2025/1/15
     * @param taskId
     * @param materialCode
     * @return com.cosmoplat.xikai.business.domain.BaseDeliveryInfo
     **/
    BaseDeliveryInfo getByTaskIdAndMaterialCode(String taskId, String materialCode);

    /**
     * 根据扫描码更新库存数量
     * @date 11:07 2025/1/15
     * @return void
     **/
    void updateStockQtyForScanCode(String qrCode);

    /**
     * 扣减库存 (法兰和绝缘轴的库存数)
     * @date 9:27 2025/1/24
     * @param doingTask
     **/
    void deductionStockQty(BaseDispatchTask doingTask);
}
